package com.dfbz.demo01;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo02_基本类型和String的转换 {

    public static void main(String[] args) {
        Integer num1 = 100;
        int num2 = 200;

//        String str = num1 + "";
        String s = true + "";

        Integer aaa=10;

        String s2 = aaa+"";
    }

    public static void test(String[] args) {


        String numStr = "110";

        int num = Integer.parseInt(numStr);
        System.out.println(num);

        String doubleStr = "205.0D";
        double d = Double.parseDouble(doubleStr);
        System.out.println(d);


        String booleanStr = "true";
        boolean boo = Boolean.parseBoolean(booleanStr);
        System.out.println(boo);

        String charStr = "a";
        char c = charStr.charAt(0);
        System.out.println(c);
    }
}
